Replication files for "Uber and Traffic Fatalities" by Anderson and Davis.

******************
Bill of Materials:
******************

Your directory
	|
	+-- "Read Me.txt" - this file
	+-- "tables and figures.do" - Stata do file to assemble analytic data set and run analyses
	+-- "Uber data readme.txt" - text file documenting details for the Uber-provided data set
	+-- "raw data" - directory containing raw data files
	|	|
	|	+-- "Census" - directory containing raw data from Census
	|	|	|	
	|	|	+-- "CBSA.xls" - Excel file mapping CBSAs to counties and containing CBSA FIPS codes
	|	|	+-- "CenPop2010_Mean_TR.txt" - text file containing Census tract locations and populations
	|	|	
	|	+-- "FARS" - directory containing raw FARS data files
	|	|	|
	|	|	+-- "accident2000.csv" through "accident2017.csv" - raw CSV FARS accident files
	|	|	+-- "person2000.csv" through "person2017.csv" - raw CSV FARS person files
	|	|	+-- "vehicle2000.csv" through "vehicle2017.csv" - raw CSV FARS vehicle files
	|	|	+-- "FARS codebooks" - directory containing FARS codebooks
	|	|		|
	|	|		+-- "2015 FARS NASS GES C&V Manual.pdf" - FARS coding and validation PDF manual
	|	|		+-- "Fatality Analysis Reporting System (FARS) Analytical User's Manual 1975-2015.pdf" - FARS analytic user PDF manual
	|	|	
	|	+-- "GSA" - directory containing raw data from GSA
	|	|	|
	|	|	+-- "FRPP_GLC_UnitedStates.csv" - CSV file mapping cities to counties and states, with FIPS codes
	|	|	
	|	+-- "other" - directory containing other raw data files
	|		|	
	|		+-- "cities.dta" - Stata dta file containing city populations
	|		+-- "co-est2017-alldata.csv" - CSV file containing county populations
	|		+-- "pems_output-VMT-hour.csv" - CSV file from PeMS containing VMT by hour-of-day for CA freeways
	|
	+-- "stata" - directory for Stata-generated intermediate files, with a do file to process data
	|	|
	|	+-- "FARS" - subdirectory for Stata-generated intermediate files and containing the do file to process data
	|		| 
	|		+-- "gen completeFARS.do" - Stata do file to process data (called by "tables and figures.do")
	|		+-- "intermediate" - directory for Stata-generated intermediate files
	|
	+-- "paper" - directory for Stata-generated results
		| 
		+-- "figs" - directory for Stata-generated figures
		+-- "tables" - directory for Stata-generated tables

**********
Execution:
**********

The directory structure is already set up for execution, but you will need to edit the root directory paths on Line 10 of "tables and figures.do" and Line 3 of "gen completeFARS.do". You will also need to obtain Uber company data in the format described in "Uber data readme.txt".

**************
Key variables:
**************

year - calendar year [FARS/Uber]
month - calendar month [FARS/Uber]
yearmonth - month of sample [FARS/Uber]
tract_id - Census tract ID [FARS/Uber]
statemonth - state-by-month of sample [FARS/Uber]
CBSAcode - CBSA code [Census]
index_tract_weighted - inverse distance weighted Uber activity index (out to radius of 10 miles) [Uber]
max_wgt_index - maximum value of index_tract_weighted by tract [Uber]
index_tract_weighted_09 - distance ^ -0.9 weighted Uber activity index (out to radius of 10 miles) [Uber]
index_tract_weighted_11 - distance ^ -1.1 weighted Uber activity index (out to radius of 10 miles) [Uber]
ifatals - indicator for any fatal accident in tract-month obs [FARS]
idrunkfatals - indicator for any alochol-involved fatal accident in tract-month obs [FARS]
ifatals_8_to_17 - indicator for any fatal accident between 8 am and 5 pm in tract-month obs [FARS]

******************
Software versions:
******************

Final analyses were run on Stata/MP 18.0 running on macOS Ventura 13, Apple Silicon architecture

*************
Data sources:
*************

FARS data:

FARS data are available for download at https://www.nhtsa.gov/crash-data-systems/fatality-analysis-reporting-system

Uber data:

Uber ridership data came from Uber, Inc. Our initial point of contact was Jonathan Hall (Uber's Chief Economist and Director of Public Policy). We described our research design to Dr. Hall and summarized preliminary results that used FARS data and compared early and later Uber-adopting cities or cities that had higher and lower growth of Uber web searches (from Google Trends). These preliminary results suggested that cities with higher Uber growth might see relative reductions in drunk-driving fatalities, but absent better data we could not be confident of these results. Subsequently we worked with Santosh Rao Danda while negotiating the data sharing agreement, and Cory Kendrick and Jonathan Wang while determing the structure of the data pull request. Under the negotiated data use agreement Uber could review and comment on the manuscript prior to submission, and we agreed to consider their comments in good faith. We were free to publish the results following that, as long as we removed any identified confidential information. Uber did not identify any confidential information in our manuscript.

Other data sets:

CenPop2010_Mean_TR.txt were downloaded from https://www2.census.gov/geo/docs/reference/cenpop2010/tract/
co-est2017-alldata.csv were downloaded from https://www.census.gov/data/tables/2017/demo/popest/counties-total.html#par_textimage
CBSA.xls were downloaded from https://www.census.gov/geographies/reference-files/time-series/demo/metro-micro/delineation-files.html
pems_output-VMT-hour.csv were downloaded from http://pems.dot.ca.gov
FRPP_GLC_UnitedStates.csv were downloaded from https://www.gsa.gov/graphics/ogp/FRPP_GLC_UnitedStates.xls
cities.dta were downloaded from https://en.wikipedia.org/wiki/List_of_United_States_cities_by_population (archived at https://web.archive.org/web/20170204190018/https://en.wikipedia.org/wiki/List_of_United_States_cities_by_population)